Global Variables
The following global variables are available globally.
-
Font to use on the label in the alert banner.
Declaration
Swift
public var alertBannerFont: UIFont = .systemFont(ofSize: 14.0) -
Text color, will be used on all three banner backgrounds.
Declaration
Swift
public var alertBannerTextColor: UIColor = .white -
Background colour for level: .error
Declaration
Swift
public var alertBannerErrorBackgroundColor: UIColor = .red -
Background colour for level: .warning
Declaration
Swift
public var alertBannerWarningBackgroundColor: UIColor = .lightGray -
Background colour for level: .success
Declaration
Swift
public var alertBannerSuccessBackgroundColor: UIColor = .green -
Message to display when calling showOfflineError(). Provide your own NetworkOfflineErrorLabel in Localizable.strings
Declaration
Swift
public var offlineAlertBannerMessage: String = NSLocalizedString("NetworkOfflineErrorLabel", tableName: "Localizable", bundle: Bundle(for: AlertBanner.self), value: "NetworkOfflineErrorLabel", comment: "NetworkOfflineErrorLabel") -
How long the banner will stay visible.
Declaration
Swift
public var alertBannerDisplayTime: TimeInterval = 4.0 -
How long the slide up/down will take.
Declaration
Swift
public var alertBannerAnimationTime: TimeInterval = 0.4 -
Provide a handler if you want to log in a different way than default print()
Declaration
Swift
public var customLog: ((_ message: String, _ level: AlertBannerLevel, _ file: String, _ line: Int)-> Void)?
Global Variables Reference